#pragma once
#include "psinterface.h"

class CPSClient : public IPSClient
{
protected:
	CPSClient(int sock, IPSMonitor* mon);
	virtual ~CPSClient();

private:
	int				m_sock;
	IPSMonitor*		m_monitor;
	int				m_count;
	long			m_nRef;

public:
	virtual int		GetEventFd();
	virtual void	OnEventIn();
	virtual void	OnEventOut();
	virtual void	OnEventPri();
	virtual void	OnEventError();

public:
	virtual long AddRef();
	virtual long Release();

protected:
	virtual void	OnRecv(char* pData, int nLen);

protected:
	bool			Init(void);

public:
	static IPSClient*	Create(int sock, IPSMonitor* mon);
};
